<?php
/*--------------------------
	file:	midp.class
	intro:	核心类功能基类
--------------------------*/
class Midp{
	
	function get(){
	}
	
	function getInstance($classname){
		$classname = strtolower($classname);
		include _path("class/".$classname);
		switch($classname){
			case "db":			
				global $db_server, $db_user, $db_pass, $db_name;
				$instance = new $classname();
				$instance->connect($db_server, $db_user, $db_pass, $db_name, 0, true);
				$db_user = $db_pswd = $db_name = NULL;
			break;
			default:
				$instance = new $classname();
		}
		return $instance;
	}
	
	function getObj(){
	}
}
?>